<template>
  <div class="file-details-container">
    <el-card>
      <h2 class="file-name">{{ fileName }}</h2>
      <p class="file-detail">类型：{{ fileType.toUpperCase() }}</p>
      <p class="file-detail">大小：{{ fileSize }}</p>
      <p class="file-detail">价格：¥ {{ filePrice }}</p>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      fileName: '',
      fileType: '',
      fileSize: '',
      filePrice: ''
    }
  },
  created() {
    const { fileName, fileType, fileSize, filePrice } = this.$route.query
    this.fileName = fileName
    this.fileType = fileType
    this.fileSize = fileSize
    this.filePrice = filePrice
  }
}
</script>

<style scoped>
.file-details-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-name {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

.file-detail {
  font-size: 16px;
  margin-bottom: 10px;
  line-height: 1.6;
  display: block;
  text-align: center;
}
</style>
